package com.yawn.demomybatis.dao;

import com.yawn.demomybatis.entity.Book;
import com.yawn.demomybatis.entity.School;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BookDao {

    @Select("select * from book where ownerId=#{ownerId}")
    List<Book> listByOwner(@Param("ownerId") int ownerId);
}
